package com.example.makerspace.dto;

import com.example.makerspace.enums.ResultCodeEnum;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

@EqualsAndHashCode(callSuper = true)
@Data
@NoArgsConstructor
@AllArgsConstructor
public class PageResult extends Result{
    private Pagination pagination;

    public static PageResult success(){
        PageResult pageResult = new PageResult();
        pageResult.setCode(ResultCodeEnum.SUCCESS.getCode());
        pageResult.setMessage(ResultCodeEnum.SUCCESS.getMessage());
        return pageResult;
    }

}
